from appium.webdriver.common.appiumby import AppiumBy

from tests.api_demo.pages.api_page.api import Api
from tests.api_demo.pages.api_page.app_page import AppPage


class MainPage(Api):
    __APP = (AppiumBy.XPATH, '//*[@text="App"]')

    def goto_app(self):
        self.find_click(*self.__APP)
        return AppPage(self.driver)

